package 二进制中1的个数;

public class Solution {

    public static void main(String[] args) {
        Solution s = new Solution();
        int i = 011000000000;
//        System.out.println(i);
//        System.out.println(s.hammingWeight(11111111111111111111111111111101));

//        System.out.println(00000000000000000000000010000000);
    }

    public int hammingWeight(int n) {
        int res = 0;
        while(n != 0) {
            res += n & 1;
            n >>>= 1;
        }
        return res;
    }
}
